package com.redis.springtest.jedis_test;

import redis.clients.jedis.Jedis;

/**
 * Created with IntelliJ IDEA.
 * Description:
 *
 * @author lzy
 * @create 2019-12-16 下午1:36
 */
public class TestMs {
    public static void main(String[] args) {
        Jedis jedis_M = new Jedis("127.0.0.1", 6379);
        Jedis jedis_S = new Jedis("127.0.0.1", 6380);

        jedis_S.slaveof("127.0.0.1", 6379);

        jedis_M.set("class", "1122");

        final String result = jedis_S.get("class");
        System.out.println(result);
    }
}
